home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
graph_pl.exe
/
GRAPH!.DOC
< prev
next >
Wrap
Text File
|
1992-02-07
|
18KB
|
511 lines
GRAPH!
Turbo C Graphing Functions
Version 1.00
Copyright (C) 1992 By Paul Lapsansky
ALL RIGHTS RESERVED
i. CONTENTS
i. CONTENTS
I. INTRODUCTION
1. What is supported
2. Registration
a. Non-registered users
b. Registered users
II. GRAPHING FUNCTIONS
1. Bargraph and Bargraph3d
a. driver
b. num_pts
c. data
d. max
e. font
f. pattern
g. color
h. x_label
i. y_label
j. title
k. x_values
l. size
3. Piechart
a. driver
b. num_pts
c. data
d. pattern
e. font
f. title
g. footnote
h. labels
III. COMPILING AND LINKING
IV. ERROR CODES
V. ORDER FORM
I. INTRODUCTION
Turbo C provides a set of powerful graphing functions for
creating bargraphs and piecharts. GRAPH! builds on these
functions to create a new set of graphing functions which
provide a complete graph from a single line automatically
scaled to fit to different display types.
1. What is supported.
GRAPH! is written completely in Turbo C. It requires
Turbo C version 1.5 or higher, Turbo C++ or Borland
C++ and the appropriate BGI files. Also required for
obvious reasons, CGA, EGA, VGA or Hercules display.
This version of GRAPH! supports the compact memory
model. Registered users of GRAPH! will receive the
tiny, small, medium, large and huge memory models.
2. Registration.
a. Non-registered users.
You may freely redistribute this archive, so long
as it is distributed intact and unmodified.
You may use this library in programs for your own
personal use. You may not distribute programs
linked with this library.
b. Registered users.
A $15 registration fee includes all the GRAPH!
libraries for all memory models. A $30
registration fee includes all of the previous
plus source code for all three GRAPH! functions.
Registered users may distribute programs linked
with the original or modified GRAPH! libraries
without further royalties.
II. GRAPHING FUNCTIONS
1. Bargraph and Bargraph3d
int bargraph(int driver, int num_pts, float[25]
data, float max, int font, int pattern,
int color, char[20] x_label, char[20]
y_label, char[20] title, char[25][10]
x_values, int size).
int bargraph3d(int driver, int num_pts, float[25]
data float max, int font, int
pattern, int color, char[20] x_label,
char[20] y_label, char[20] title,
char[25][10] x_values, int size).
a. driver sets the display type. It requires and
uses the BGI driver files. The display is auto-
matically set to the highest possible resolution
for the driver.
Macro Value Resolution
------------------------------------------------
DETECT 0 highest possible
CGA 1 640x200 2 color
MCGA 2 640x480 2 color
EGA 3 640x350 16 color
EGA64 4 640x350 4 color
EGAMONO 5 640x350 2 color
HERCMONO 7 720x348 2 color
ATT400 8 640x400 2 color
VGA 9 640x480 16 color
PC3270 10 720x350 2 color
b. num_pts is set to the number of data points that
will be plotted. The maximum number of points
possible is 25.
c. data is an array that holds the data to be
plotted. The maximum number of data points is
25.
d. max holds the max possible value on the y-axis.
If this value is set to 0 then the largest data
point will be used.
e. font is set to the desired BGI text style.
Macro Value Meaning
----------------------------------------------
DEFAULT_FONT 0 8x8 bit-mapped
TRIPLEX_FONT 1 Stroked triplex
SMALL_FONT 2 Small stroked
SANS_SERIF_FONT 3 Stroked sans serif
GOTHIC_FONT 4 Stroked gothic
f. pattern is set to the desired fill pattern.
Macro Value Meaning
----------------------------------------------
EMPTY_FILL 0 Background color
SOLID_FILL 1 Solid color
LINE_FILL 2 Lines
LTSLASH_FILL 3 Light slashes
SLASH_FILL 4 Slashes
BKSLASH_FILL 5 Backslashes
LTBKSLASH_FILL 6 Light backslashes
XHATCH_FILL 8 Hatching
INTERLEAVE_FILL 9 Interleaving
WIDEDOT_FILL 10 Widely spaced dots
CLOSEDOT_FILL 11 Close dots
g. color is set to the desired fill color.
Macro Value
--------------------------
BLACK 0
BLUE 1
GREEN 2
CYAN 3
RED 4
MAGENTA 5
BROWN 6
LIGHTGRAY 7
DARKGRAY 8
LIGHTBLUE 9
LIGHTGREEN 10
LIGHTCYAN 11
LIGHTRED 12
LIGHTMAGENTA 13
YELLOW 14